<template>
    <view>
        <block name="online_license">
            <view class="apply_container" :style="'min-height:auto;background:' + color_two + ';padding-bottom:0;'" v-if="!olData.entry_other_data.url">
                <view class="apply_row b_all">
                    <text class="apply_check">*</text>
                    <view class="apply_name fl" :style="'color:' + color_one + ';'">姓名</view>
                    <view class="apply_value fl">
                        <input
                            @input="olNameChange"
                            @blur="olNameChange"
                            name="name"
                            data-name="name"
                            :data-required="true"
                            placeholder="请输入姓名"
                            v-if="color_status == '1'"
                            :placeholder-style="'color:' + color_one + ';'"
                            type="text"
                            value=""
                        />
                        <input
                            @input="olNameChange"
                            @blur="olNameChange"
                            name="name"
                            data-name="name"
                            :data-required="true"
                            placeholder="请输入姓名"
                            v-else
                            placeholder-class="phcolor"
                            type="text"
                            value=""
                        />
                    </view>
                </view>
                <view
                    class="apply_row b_all"
                    v-if="
                        live.id != 5687 &&
                        live.id != 5821 &&
                        live.id != 5643 &&
                        live.id != 5769 &&
                        live.id != 7002 &&
                        live.id != 7213 &&
                        live.id != 6922 &&
                        live.id != 5787 &&
                        live.id != 7688 &&
                        live.id != 7689 &&
                        live.id != 7690 &&
                        live.id != 7776 &&
                        live.id != 7777 &&
                        live.id != 7778 &&
                        live.id != 5623 &&
                        live.id != 7610 &&
                        live.id != 7611 &&
                        live.id != 7612 &&
                        live.id != 7782 &&
                        live.id != 7783 &&
                        live.id != 7784 &&
                        live.id != 7901 &&
                        live.id != 7902 &&
                        live.id != 7792 &&
                        live.id != 8004 &&
                        live.id != 8005 &&
                        live.id != 8043 &&
                        live.id != 8071 &&
                        live.id != 6256 &&
                        live.id != 8147 &&
                        live.id != 8150 &&
                        live.id != 8151 &&
                        live.id != 8152 &&
                        live.id != 8154 &&
                        live.id != 8155 &&
                        live.id != 8091 &&
                        live.id != 8126 &&
                        live.id != 8210 &&
                        live.id != 8209 &&
                        live.id != 7446 &&
                        live.id != 8159 &&
                        live.id != 7047 &&
                        live.wxapp_id != 400 &&
						live.wxapp_id != 401
                    "
                >
                    <text class="apply_check">*</text>
                    <view class="apply_name fl" :style="'color:' + color_one + ';'">{{ live.id == '6702' ? '证件类型' : '组别' }}</view>
                    <view class="select-current" @tap.stop.prevent="openCloseXxGroups">
                        <picker @change="olGroupChange" :value="onlineLicenseNameGroupIndex" :range="onlineLicenseGroups" :data-range="onlineLicenseGroups">
                            <view class="picker" :style="'color:' + color_one + ';'">
                                <text class="current-name" :style="'color:' + color_one + ';'">{{ onlineLicenseGroupTemp ? onlineLicenseGroupTemp : '请选择' }}</text>
                            </view>
                        </picker>
                    </view>
                </view>
                <view
                    class="apply_row b_all"
                    v-if="
                        live.id == 5821 ||
                        live.id == 5623 ||
                        live.id == 8004 ||
                        live.id == 8005 ||
                        live.id == 8071 ||
                        live.id == 8147 ||
                        live.id == 8150 ||
                        live.id == 8151 ||
                        live.id == 8152 ||
                        live.id == 8154 ||
                        live.id == 8155
                    "
                >
                    <text class="apply_check">*</text>
                    <view class="apply_name fl" :style="'color:' + color_one + ';'">手机号</view>
                    <view class="apply_value fl">
                        <input
                            @blur="olAgeChange"
                            @input="olAgeChange"
                            name="name"
                            data-name="age"
                            :data-required="true"
                            placeholder="请输入手机号"
                            v-if="color_status == '1'"
                            :placeholder-style="'color:' + color_one + ';'"
                            type="text"
                            value=""
                        />
                        <input
                            @blur="olAgeChange"
                            @input="olAgeChange"
                            name="name"
                            data-name="age"
                            :data-required="true"
                            placeholder="请输入手机号"
                            v-else
                            placeholder-class="phcolor"
                            type="text"
                            value=""
                        />
                    </view>
                </view>
                <view
                    class="apply_row b_all"
                    v-if="live.id == 5769 || live.id == 7610 || live.id == 7611 || live.id == 7612 || live.id == 7782 || live.id == 7783 || live.id == 7784 || live.id == 8091"
                >
                    <text class="apply_check">*</text>
                    <view class="apply_name fl" :style="'color:' + color_one + ';'">身份证号</view>
                    <view class="apply_value fl">
                        <input
                            @blur="olAgeChange"
                            @input="olAgeChange"
                            name="name"
                            data-name="age"
                            :data-required="true"
                            placeholder="请输入身份证号"
                            v-if="color_status == '1'"
                            :placeholder-style="'color:' + color_one + ';'"
                            type="text"
                            value=""
                        />
                        <input
                            @blur="olAgeChange"
                            @input="olAgeChange"
                            name="name"
                            data-name="age"
                            :data-required="true"
                            placeholder="请输入身份证号"
                            v-else
                            placeholder-class="phcolor"
                            type="text"
                            value=""
                        />
                    </view>
                </view>
                <view
                    class="apply_row b_all"
                    v-if="
                        live.id == 7688 ||
                        live.id == 7689 ||
                        live.id == 7690 ||
                        live.id == 7776 ||
                        live.id == 7777 ||
                        live.id == 7778 ||
                        live.id == 7901 ||
                        live.id == 7902 ||
                        live.id == 7792 ||
                        live.id == 8043 ||
                        live.id == 6256 ||
                        live.id == 8210 ||
                        live.id == 8209 ||
                        live.wxapp_id == 400
                    "
                >
                    <text class="apply_check">*</text>
                    <view class="apply_name fl" :style="'color:' + color_one + ';'">参赛编号</view>
                    <view class="apply_value fl">
                        <input
                            @blur="olAgeChange"
                            @input="olAgeChange"
                            name="name"
                            data-name="age"
                            :data-required="true"
                            placeholder="请输入参赛编号"
                            v-if="color_status == '1'"
                            :placeholder-style="'color:' + color_one + ';'"
                            type="text"
                            value=""
                        />
                        <input
                            @blur="olAgeChange"
                            @input="olAgeChange"
                            name="name"
                            data-name="age"
                            :data-required="true"
                            placeholder="请输入参赛编号"
                            v-else
                            placeholder-class="phcolor"
                            type="text"
                            value=""
                        />
                    </view>
                </view>
                <view class="apply_btn_wrap" style="text-align: center" v-if="live.id == 5936">查询时间：7月1日-7月3日</view>
                <view class="apply_btn_wrap">
                    <view @tap="onlineLicenseSubmit" class="apply_submit_btn" :style="'color:' + color_three + ';background-color:' + color_one + ';'">立即查询</view>
                </view>

                <view :class="'page-dec ' + themes" v-if="is_xxfen_des" :style="'color:' + color_one + ';'">
                    <!-- <template is="wxParse" :data="wxParseData:WxParseListArr[tab_id]"></template> -->
                    <mp-html :content="WxParseListArr[tab_id]"></mp-html>
                </view>
            </view>

            <view :class="'online-license-view ' + themes" v-if="olStatus == 1">
                <view v-if="olData.entry_other_data.url">
                    <image
                        :src="olData.entry_other_data.url"
                        @tap="photoLivePreview"
                        :show-menu-by-longpress="true"
                        :data-url="olData.entry_other_data.url"
                        style="width: 100%"
                        mode="widthFix"
                    ></image>
                </view>
                <view class="table" style="color1: #000" v-else>
                    <view class="tr">
                        <view class="td td-title" style="font-weight: 900; font-size: 15px">{{ tab_name ? tab_name : '查询结果' }}</view>
                    </view>
                    <view class="tr" v-if="olData.name">
                        <view class="td td-30">姓名</view>
                        <view class="td td-70">{{ olData.name }}</view>
                    </view>
                    <view class="tr" v-if="olData.groups">
                        <view class="td td-30">{{ live.id == '6702' ? '证件类型' : '组别' }}</view>
                        <view class="td td-70">{{ olData.groups }}</view>
                    </view>
                    <view class="tr" v-if="olData.entry_num">
                        <view class="td td-30">
                            {{
                                olData.live_id == 7610 ||
                                olData.live_id == 7611 ||
                                olData.live_id == 7612 ||
                                olData.live_id == 7782 ||
                                olData.live_id == 7783 ||
                                olData.live_id == 7784
                                    ? '点到号'
                                    : '参赛号码'
                            }}
                        </view>
                        <view class="td td-70">{{ olData.entry_num }}</view>
                    </view>
                    <view class="tr" v-if="olData.entry_date">
                        <view class="td td-30">
                            {{
                                olData.live_id == 7610 ||
                                olData.live_id == 7611 ||
                                olData.live_id == 7612 ||
                                olData.live_id == 7782 ||
                                olData.live_id == 7783 ||
                                olData.live_id == 7784
                                    ? '身份证号'
                                    : '参赛日期'
                            }}
                        </view>
                        <view class="td td-70">{{ olData.entry_date }}</view>
                    </view>
                    <view class="tr" v-if="olData.entry_time">
                        <view class="td td-30">{{ olData.live_id == 7225 || olData.live_id == 7218 ? '展演时间' : '参赛时间' }}</view>
                        <view class="td td-70">{{ olData.entry_time }}</view>
                    </view>
                    <view class="tr" v-if="olData.entry_address">
                        <view class="td td-30">{{ olData.live_id == 7225 || olData.live_id == 7218 ? '展示区' : '参赛场地' }}</view>
                        <view class="td td-70" v-if="olData.live">
                            <navigator :url="'/wxz_wzbagent/pages/movie/movie?rid=' + olData.live.rid + '&id=' + olData.live.id" style="color: #f00">
                                {{ olData.entry_address }} >>>点击前往
                            </navigator>
                        </view>
                        <view class="td td-70" v-else>{{ olData.entry_address }}</view>
                    </view>
                    <block v-for="(item, index) in olData.entry_other_data.title" :key="index">
                        <view class="tr" v-if="item">
                            <view class="td td-30">{{ item }}</view>
                            <view class="td td-70">{{ olData.entry_other_data.value[index] }}</view>
                        </view>
                    </block>
                </view>
            </view>
        </block>
    </view>
</template>

<script>
// wxz_wzbagent/pages/menu/online_license.js
export default {
    data() {
        return {
            color_two: '',

            olData: {
                entry_other_data: {
                    url: '',
                    title: [],
                    value: ''
                },

                name: '',
                groups: '',
                entry_num: '',
                live_id: 0,
                entry_date: '',
                entry_time: '',
                entry_address: '',

                live: {
                    rid: '',
                    id: ''
                }
            },

            color_one: '',
            color_status: '',

            live: {
                id: 0,
                wxapp_id: 0
            },

            onlineLicenseNameGroupIndex: 0,
            onlineLicenseGroups: [],
            onlineLicenseGroupTemp: false,
            color_three: '',
            themes: '',
            is_xxfen_des: [],
            olStatus: 0,
            tab_name: false
        };
    }
    /**
     * 生命周期函数--监听页面加载
     */,
    onLoad: function (options) {
        console.log(options);
    },
    /**
     * 生命周期函数--监听页面初次渲染完成
     */
    onReady: function () {},
    /**
     * 生命周期函数--监听页面显示
     */
    onShow: function () {},
    /**
     * 生命周期函数--监听页面隐藏
     */
    onHide: function () {},
    /**
     * 生命周期函数--监听页面卸载
     */
    onUnload: function () {},
    /**
     * 页面相关事件处理函数--监听用户下拉动作
     */
    onPullDownRefresh: function () {},
    /**
     * 页面上拉触底事件的处理函数
     */
    onReachBottom: function () {},
    /**
     * 用户点击右上角分享
     */
    onShareAppMessage: function () {},
    methods: {
        olNameChange() {
            console.log('占位：函数 olNameChange 未声明');
        },

        openCloseXxGroups() {
            console.log('占位：函数 openCloseXxGroups 未声明');
        },

        olGroupChange() {
            console.log('占位：函数 olGroupChange 未声明');
        },

        olAgeChange() {
            console.log('占位：函数 olAgeChange 未声明');
        },

        onlineLicenseSubmit() {
            console.log('占位：函数 onlineLicenseSubmit 未声明');
        },

        photoLivePreview() {
            console.log('占位：函数 photoLivePreview 未声明');
        }
    }
};
</script>
<style>
@import './online_license.css';
</style>
